import 'package:flutter/material.dart';
import 'package:get/get.dart';

class GetxTools {
  //成功弹窗
  SuccessToast(message) {
    Get.snackbar("congratulations".tr, message,
        borderWidth: 1.0,
        borderColor: Colors.green,
        colorText: Colors.green,
        icon: Icon(
          Icons.check_circle,
          color: Colors.green,
        ),
        backgroundColor: Color(0xffE1F3D8),);
  }

  //失败弹窗
  ErrorToast(message) {
    Get.snackbar("Imsorry".tr, message,
        borderWidth: 1.0,
        borderColor: Colors.red,
        colorText: Colors.red,
        icon: Icon(
          Icons.cancel,
          color: Colors.red,
        ),
        backgroundColor: Color.fromRGBO(253, 226, 226, 1));
  }

  //警告弹窗
  WaringToast(message) {
    Get.snackbar("warn".tr, message,
        borderWidth: 1.0,
        borderColor: Colors.orange,
        colorText: Colors.orange,
        icon: Icon(
          Icons.info,
          color: Colors.orange,
        ),
        backgroundColor: Color.fromRGBO(250, 236, 216, 1));
  }
}
